package com.wms.service.impl;

import com.wms.mapper.OrderMapper;
import com.wms.pojo.Order;
import com.wms.service.OrderService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class OrderServiceImpl implements OrderService {

    @Autowired
    private OrderMapper orderMapper;

    @Override
    public List<Order> queryAll() {
        List<Order> orders = orderMapper.queryAll();
        return orders;
    }

    @Override
    public Boolean addOrder(Order order) {
        return orderMapper.addOrder(order);
    }

    @Override
    public Boolean deleteOrder(Integer id) {
        return orderMapper.deleteOrder(id);
    }

    @Override
    public Boolean updateOrder(Order order) {
        return orderMapper.updateOrder(order);
    }

    @Override
    public Order queryById(Integer id) {
        Order order = orderMapper.queryById(id);
        return order;
    }
}
